package cn.icanci.learn.v1.aop4;

import cn.icanci.learn.v1.aop.Animal;
import cn.icanci.learn.v1.aop.Cat;

/**
 * @author icanci
 * @date Created in 2021/06/27 17:08
 * @version 1.0
 */
public class AnimalMainTest4 {
    public static void main(String[] args) {
        Animal cat = new Cat();
        final JDKDynamicProxy4 jdkDynamicProxy4 = new JDKDynamicProxy4(cat);
        jdkDynamicProxy4.setInterceptor(new OneMyMethodInterceptor());
        jdkDynamicProxy4.setInterceptor(new TwoMyMethodInterceptor());
        final Animal proxy = (Animal) jdkDynamicProxy4.getProxy();
        proxy.eat();
    }
}
